﻿/*****************************************************************************/
/* Step 2. Create stored procedure                                           */
/*****************************************************************************/
CREATE PROCEDURE [ApplicationManagement].[ApplicantWith]( @ApplicantOID BIGINT )
AS 
BEGIN

	SELECT Applicants.[OID] as 'ApplicantsOID'
			,Applicants.[Version] as 'ApplicantsVersion'
			,Applicants.[KinshipID]
			,Applicants.[AddressID]
			,People.OID as 'PeopleOID' 
			,People.Version as 'PeopleVersion'
			,People.FirstName 
			,People.LastName 
			,People.MiddleInitial 
			,People.DOB 
			,People.Sex 
			,People.Phone1 
			,People.Phone2 
			,People.eMailAddress
	FROM Applicants
	INNER JOIN People ON Applicants.OID = People.OID
	WHERE Applicants.OID = @ApplicantOID

END


